<?php
    $APIMaxPage = 10000000;
	$appid = array(
	
		'CVpXydixg67VynVjdsPv421PPQNGkkZKoqEfkLpbmJAFzzK3miDFZzSjDHS2f8M4.eCJ61w-',		// pagedown_99999で作成
		'ivYDQhCxg64qkk6A1tkaZm72O2aIMF1t3R1V4gFD5lwI429i32wd8pZq66zU2Yh8fVv25hI-',		// pagedown_99999で作成
		'rxmOzQyxg67YKkzinVol_1QaRubGreuwJNfyo3I.Qo1jTqHWDND55UyG.dX4E6jtE1Z_jfM-',		// pagedown_99999で作成
		'voFK9yOxg65o.2AP5GLDvmeN4YCxI8BOiIOiEgFnNLBUiw.1DJSBX8bRv6AtO8yruOYmK8g-',		// pagedown_99999で作成
		'2LouBFmxg66aVtWCczV1XfdcL3.TpV7TwBDN8.miWRvol4mt0rF7h2qFRufuiLkiPeD5Q1A-',		// pagedown_99999で作成
		'vVIbyk2xg65QRHJu0WSIVw6mkyYWlCpLGrfHlhlpqROQrZ6MixBxlFiZ0L2By6IJA7A3Gnc-',		// pagedown_99999で作成
		'NtwZ.JCxg66vDnbcvYAoFEXxr4CN9TNuvsbKNTcP5mgn_wRw1tRv8qQP4rXxsxnTJzwpNuU-',		// pagedown_99999で作成
		'83nNH62xg64_4aztiA0IODpDk1yJ.W3xxwqtB8wuq5lDMc8.8.Q8EF0U2GCXkdrvHeneMuo-',		// pagedown_99999で作成
		'zIIr8Kqxg67tVcNP8RwAm3VnSklgIxW9qVh_6xmpQY2PJdmildR1wF391k9t7Gwan2rXKVE-',		// pagedown_99999で作成
		'FmffoMSxg64egsiCtwjSQpOlv3ZSg2Syk3WYtXbz1Z4ATW0jgyds3DRQeS2pz8ygZRh6jMM-',		// pagedown_99999で作成

		'IhOXJF2xg65u2ot.jw.ceVGarQ1eN0cSBMJIAineD.vq1ulYLGV4J1AsO8ZNQNzDsFhGfg--',		// fromjapancojpで作成
		'H_KjKfSxg662yj83r_vXu.x80kqJtbcu.tNyBSVrVzSbTWcmKa6tEfLITy4ir9MpejVVfw--',		// fromjapancojpで作成
		'iNAH8Zqxg657HbvEagS0yXsgl2L8JF_Xq1Cxd6r_YZfpDmbF7MkJemgVpFxQl5z5ZObSzQ--',		// fromjapancojpで作成
		'9sBs0Oexg65MSvZf.0yK8ykRVhygEwQuF49Yf9JOF8vbKR1xgWYkaB383DoMA0DcCrt_mw--',		// fromjapancojpで作成
		'Lq_hPx.xg66zz.eoA6.7Rj2Pa0lEyx_eLV06CudIZFwteWdYu37_NhiAkA_..hXhkXfq0g--',		// fromjapancojpで作成
		'QZKAw16xg67CGR3pb3q4aSiCS8KYGeeNSCnWfjmHbGuqSnedW8Qa3PzLu0AU73hKU4RXtw--',		// fromjapancojpで作成
		'PPqh.x6xg67ArWwhOTZsah3fsQGw5XRsloVGBnRH426oOb6oPGm71cL_T4xlsx9Z97t.Lw--',		// fromjapancojpで作成
		'WNQERBCxg64_6tQn21r5RIVdjZUJ.ByDk4.JAVuHO28FTeVTzZ1NnHivs18uskb6vrTOow--',		// fromjapancojpで作成
		'tinEkdWxg66ZMX6oKTGs_4ifr9AXi1CzX2BGbKZEI3R_ybkx7HjS.nru8tPcQ7ghYK5RLA--',		// fromjapancojpで作成
		'c6aKQiGxg66O9QmQA9IA93NXXwOvt1jvRPO.1CLVt237dh7MZKxM30Ox.lWf17KTtvHMpQ--',		// fromjapancojpで作成

		'6pMcsNaxg66rtJuuWLEiagiIre.6lWqh5vlC4bxuusIoyB79KJ04sSIYOqrLH2EX_IBsn6o-',		// fromjapancojp1で作成
		'wh0gij6xg658Byk53Ea3gt_W.E4UUPvd_PdXRJ4F9q9jfQIfc.wguxhQdfOk57wtIJs2V9k-',		// fromjapancojp1で作成
		'bRwUkHKxg67xxrYprRJZi3A_nmo_2TfeJYCg8hnFoTbgdY_s7hY_w0X9UXmRcqVw89ssTa8-',		// fromjapancojp1で作成
		'VYqWyESxg67Hib3YXEjUtvPJaLmC_0yFLHd5eMeCh4uBiulWgqLllnriMHbFQsIPV4FyqJo-',		// fromjapancojp1で作成
		'87Sf9eixg67sqCwewgkDLqz8EZL4_KWyPh1muxTYRj927qbp2PcCOWoIl8Zgxjuwpvj03ws-',		// fromjapancojp1で作成
		'uz9Da3axg64SwIhYuu1RQ6vHtrfsXyjSgsyj.vyMXjwJEC66UeYqaKqBxQmsw8K5VPrjcnc-',		// fromjapancojp1で作成
		'JVHl3R6xg67QdlGLTZTgVKpQ1Hoj3pwLmLFpIA9Yh2PGyvACADWGEm6XXAL7zYOvVfv.wJg-',		// fromjapancojp1で作成
		'iY2hHHOxg66gLNOjULsU4bkg9Xs4Djz_ecFioRFynxnhm80YlocBxdCmfBIaHsPAo64EUbk-',		// fromjapancojp1で作成
		'o7jbaw2xg64D53LClUCdfU.5P1GA7MVL7IDO7S3Byy0Svw98n.czXZp51pg65rlKTXvFVow-',		// fromjapancojp1で作成
		'vK13H6axg66NqbRMwP20Qp7hSdwDyr5bupiC_ic58lgu6fP88lZgm1Vfx_Y_uOX4YbmPCis-',		// fromjapancojp1で作成

	);
	
	$ItemUrl = "http://shopping.yahooapis.jp/ShoppingWebService/V1/json/itemLookup?";
	$ListUrl = "http://shopping.yahooapis.jp/ShoppingWebService/V1/json/itemSearch?";
	$affiliate_id = "QM7JA_j9wKoCDXe1g7yKdTY-";
	$XmlOrJson = "JSON";
	$ListModel = array(
			"Available"	=> "totalResultsAvailable",//all count
			"item"		=> array(
								"Result=>{n}"	=> array(
										"site"		=> "yahoo",
										"title"		=> "Name",
										"itemid"	=> "Code",
										"img"		=> "Image=>Small",
										"price"		=> "Price=>_value",
										"bidorbuy"	=> "",
										"store"		=> "Store=>Name",
										"NewItem"	=> "New",
										"bids"		=> "",//auction
										"starttime"	=> "",
										"endtime"	=> "",
										"timeleft"	=> ""
									)
							)
		);
	$ItemModel = array(
			"title"		=> "Result=>0=>Name",
			"itemid"	=> "Result=>0=>Code",
			"img"		=> "Result=>0=>Image=>Medium",
			"url"		=> "Result=>0=>Url",
			"price"		=> "Result=>0=>Price=>_value",//現在価格です
			"quantity"	=> "",//商品の数量です。
			"bidorbuy"	=> "",//即決価格です
			"bids"		=> "",//現在の入札数です
			"condition"	=> "",//商品の状態です。
			"endtime"	=> "",
			"remaintime"=> "",//残り時間
			"store"		=> "",//有 StoreIcon :オークションストアの出品   无:一般の出品者の出品
			"postageFlag"		=> "Shipping=>Name",//設定なし／送料無料／条件付送料無料
			"taxFlag"		=> "",//0：税込1：税別
			"itemCaption"		=> "Description"//商品説明文
		);
	$Category = array(
      "All" =>"",
			"Food"			=>	"2498",//食品、飲料
			"HealthPersonalCare"	=>	"2500",//健康个人护理
			"Beauty"		=>	"2501",//美容ビューティー
			"Computer"		=>	"2502",//电脑
			"Cameras"		=>	"2504",//カメラ
			"Electronics"	=>	"2505",//电子 家電、AV、カメラズ
			"HomeImprovement"		=>	"2506",//家居改善住まい、インテリア
			"Lawn"			=>	"2507",//花、園芸
			"Grocery"		=>	"2058",// キッチン、生活雑貨、日用品
			"OfficeProducts"=>	"2503",//办公产品 事務、店舗用品 文具
			"Pets"			=>	"2509",//ペット、生き物
			"Hobbies"				=>	"2510",//爱好 ホビー
			"Toys"			=>	"2511",//玩具おもちゃ
			"Baby"			=>	"2497",//宝贝
			"SportingGoods"	=>	"2512",//体育用品
			"Outdoors"		=>	"2513",//Outdoors 休闲レジャー、アウトドア
			"Automotive"	=>	"2514",//汽车
			"Music"			=>	"2516",//音乐
			"Video"			=>	"2517",//映画、ビデオ
			"Books"			=>	"10002",//书籍
      
			//"Fashion"		=>	"13457",//ファッション|时尚
			//"MusicalInstruments"	=>	"2510",//乐器
		);
	$SortOrder = array(
			"end,A"		=>	urlencode("-sold"),
			"end,D"		=>	urlencode("+sold"),
			"price,A"	=>	urlencode("-price"),
			"price,D"	=>	urlencode("+price"),
			"bids,A"		=>	urlencode("-review_count"),
			"bids,D"		=>	urlencode("+review_count")
			);

	$ItemParam = array(
			"appid"			=>	$appid[rand(0,count($appid)-1)],
			"affiliate_type"=>	"yid",
			"affiliate_id"	=>	$affiliate_id,
			"callback"		=>	"",
			"itemcode"		=>	_GET("itemid"),
			"responsegroup"	=>	"medium"//image size
		);
	$pagesize = _GET("n",20);
	$pagesize = $pagesize>50?"50":$pagesize;
	$ListParam = array(
			"appid"			=>	$appid[rand(0,count($appid)-1)],
			"affiliate_type"=>	"yid",
			"affiliate_id"	=>	$affiliate_id,
			"callback"		=>	"",
			"query"			=>	$keyword,
			"type"			=>	"",
			"jan"			=>	"",
			"isbn"			=>	"",
			//"category_id"	=>	$Category[$_GET["c"]],
			"category_id"	=>	checknull("id", checknull(_GET("c"), $SiteCate["shopping"]["yahoo"])),
			"category_id_all"    => checknull("yahoo", checknull(_GET("c"), $SiteCate["shopping"]["all"])),
			"product_id"	=>	"",
			"person_id"		=>	"",
			"brand_id"		=>	"",
			"store_id"		=>	"",
			"price_from"	=>	_GET("Minprice"),
			"price_to"		=>	_GET("Maxprice"),
			"hits"			=>	$pagesize,
			"offset"		=>	$pagesize*($pagenum-1),
			//"sort"			=>	empty($_GET["s"])?"":$SortOrder[$_GET["s"]],
			"sort"			=>	checknull(_GET("s"), $SortOrder),
			"affiliate_from"=>	"",
			"affiliate_to"	=>	"",
			"module"		=>	"",
			"availability"	=>	"",
			"discount"		=>	"",
			"shipping"		=>	""
		);
?>